//http
var http = require("http")
//fs
var fs = require("fs")
http.createServer(function(req,res){
	//跨域
	res.setHeader("Access-Control-Allow-Origin","*")
	//响应头
	res.writeHead(200,{"Content-Type":"text/html;charset=utf-8"})
	//fs
	fs.readFile("json.json","utf-8",function(err,data){
		if(err){
			throw err
		}
		res.end(data)
	})
	
}).listen(5858,function(){console.log("请求成功")})
